#region Copyright RenGuiYou. All rights reserved.
//=====================================================
// PandoraFrameWork
// Author:      RenGuiyou
// Feedback: 	mailto:750539605@qq.com
//=====================================================
#endregion
using System;
using UnityEngine;

namespace Pandora
{
    public static class LogFile
    {
        private static readonly string PDR_LOG_PATH = Application.dataPath + "/../Pandora/LogFile";
        public static void WriteLog(string title, string content)
        {
            var date = DateTime.Now.ToString("yyyyMMdd_HHmmss");
            string fileName = date;
            if (!string.IsNullOrEmpty(title))
            {
                fileName = $"{date}_[{title}]";
            }
            fileName += ".txt";
            PdrFileUtil.SaveTextToFile(PDR_LOG_PATH, fileName, content);
        }

        public static void OpenLogExplorer()
        {
            PdrFileUtil.OpenFolder(PDR_LOG_PATH);
        }

        public static void ClearAllLogs()
        {

        }
    }

}
